define(['jquery'], function ($) {
    'use strict';
    /**对当前元素交换显示类 */
    function replaceClass(cur, one, two) {
        if (cur.hasClass(one)) {
            cur.removeClass(one);
            cur.addClass(two);
        }
    }
   /**隐藏页面中的主面板 */
    function hiddeMiddleMainPanel() {
        var $curShow = $("#salad-panel").children("div.active");
        $curShow.removeClass("active");
        $curShow.addClass("hidden");
    }
   /**将用于分类显示产品的面板切换到显示状态 */
    function showCategoryPanel() {
        var $categoryPanel = $(".salad-middle-categories");
        $categoryPanel.removeClass("hidden");
        $categoryPanel.addClass("active");
    }

    return {
        replaceClass: replaceClass,
        hiddeMiddleMainPanel: hiddeMiddleMainPanel,
        showCategoryPanel: showCategoryPanel
    };
});